using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;

namespace HadronData
{
    [ContentTypeWriter]
    public class LevelContentTypeWriter : ContentTypeWriter<Level>
    {
        protected override void Write(ContentWriter p_contentWriter, Level p_level)
        {
            p_contentWriter.Write(p_level.Name);
            p_contentWriter.WriteObject<String[]>(p_level.Mission);
            p_contentWriter.Write(p_level.Dimensions);
            p_contentWriter.WriteObject<List<Layer>>(p_level.Layers);
            p_contentWriter.WriteObject<List<EntityMarker>>(p_level.EntityMarkers);
            p_contentWriter.WriteObject<LevelObjectives>(p_level.Objectives);
        }

        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            return typeof(LevelContentTypeReader).AssemblyQualifiedName;
        }
    }
}
